import { Component, OnInit,Input,Output,EventEmitter } from '@angular/core';

@Component({
  selector: 'app-radio',
  templateUrl: './radio.component.html',
  styleUrls: ['./radio.component.css']
})
export class RadioComponent implements OnInit {
  
  @Input()name:string;
  @Input()checked:Boolean;
  @Output()doCheck=new EventEmitter<any>();

  constructor() { }
  ngOnInit() {
     this.checked=this.checked ? true : false;
  }
  select(){
     this.doCheck.emit();
  }
}
